import PageTools from "@/components/PageTools/index.vue";
import moment from "moment";
import UploadExcel from "@/components/UploadExcel";
import ImageUpload from "@/components/ImageUpload";

export default {
  install(Vue) {
    // 配置全局组件
    Vue.component(PageTools.name, PageTools);
    Vue.component(UploadExcel.name, UploadExcel); // 注册导入excel组件
    Vue.component(ImageUpload.name, ImageUpload); // 注册导入图片上传组件

    // 扩展全局过滤器(格式化事件)
    Vue.filter("formTime", (value) => {
      return moment(value).format("yyyy-MM-DD");
    });
  },
};
